package org.liuqm.factory.simplefactory.sevice;

import org.liuqm.factory.simplefactory.APSPrint;
import org.liuqm.factory.simplefactory.BlackWhitePrint;
import org.liuqm.factory.simplefactory.ColorPrint;
import org.liuqm.factory.simplefactory.Print;
import org.liuqm.factory.simplefactory.dao.UserDao;
import org.liuqm.factory.simplefactory.dao.impl.UserDaoImpl;
import org.liuqm.factory.simplefactory.dao.impl.UserDaoImplV3;
import org.liuqm.factory.simplefactory.dao.impl.UserDaoImplv2;

public class UserDaoFactory {

    /**
     * 生成打印机
     * @param printType
     * @return
     */
    public static UserDao createUserDao(String printType){
        UserDao print=null;
        switch (printType){
            case "UserDaoImpl":
                print=new UserDaoImpl();
                break;
            case "UserDaoImplv2":
                print=new UserDaoImplv2();
                break;
            case "UserDaoImplV3":
                print=new UserDaoImplV3();
                break;

            default:
                print=new UserDaoImpl();
                break;
        }

        return print;
    }
}
